package collection;

import java.util.ArrayList;
import java.util.Collection;

public class collectionDemo2 {
    public static void main(String[] args) {
        Collection collection = new ArrayList();
        collection.add(new Point(1,2));
        collection.add(new Point(3,4));
        collection.add(new Point(5,6));
        collection.add(new Point(1,2));
        System.out.println(collection);
        Point p=new Point(1,2);
        System.out.println(collection.contains(p));
        collection.remove(p);
        System.out.println(collection);
        collection.remove(p);
        System.out.println(collection);
        collection.remove(p);
        System.out.println(collection);
    }
}
